﻿@page "/settings"

<h1>参数设置</h1>

<EditForm Model="@serialPortModel" OnValidSubmit="@HandleValidSubmit">
    <DataAnnotationsValidator />
    <ValidationSummary />
    <p>
        <label>
            端口:
            <InputSelect @bind-Value="serialPortModel.PortName">
                <option value="COM1">COM1</option>
                <option value="COM2">COM2</option>
                <option value="COM3">COM3</option>
                <option value="COM4">COM4</option>
            </InputSelect>
        </label>
    </p>
    <p>
        <label>
            波特率:
            <InputSelect @bind-Value="serialPortModel.BaudRate">
                <option value="9600">9600</option>
            </InputSelect>
        </label>
    </p>
    <p>
        <label>
            波特率:
            <InputNumber @bind-Value="serialPortModel.DataBits" />
        </label>
    </p>
    <button class="btn btn-primary" type="submit">Submit</button>
</EditForm>


